from blinker import signal

# 创建信号对象
request_finished = signal("request-finished")

# 注册监听器（订阅信号）
@request_finished.connect
def handle_request_finished(sender, **kwargs):
    print(f"[Signal] Sender: {sender}, User: {kwargs.get('user_id')}")
